<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Caf&eacute; de Chiapas</title>
        
    <link rel="stylesheet" type="text/css" href="../css/estilo_apoyos.css" />
    <link rel="stylesheet" href="../jScripts/popupbox/popupbox_blanco.css" />
    <link rel="stylesheet" type="text/css" href="../jScripts/cloudZoom/cloud-zoom.css"/>
    <script type="text/JavaScript" src="../jScripts/cloudZoom/cloud-zoom.1.0.2.min.js"></script>
    <script type="text/JavaScript" src="../jScripts/cloudZoom/cloud-zoom.1.0.2.js"/>
    <script type="text/JavaScript" src="../jScripts/functions.js"></script>

</head>
<body>
<div id="imgZ"  style="height: 200px;"/>
<?php
    if(isset($_GET['id'])){
        include("class/Conexion.php");
        global $conexion;

        $id= explode('?',$_GET['id']);

        $sql= "select * from producto where id=".$id[0]."";
        
        $query = mysql_query($sql,$conexion);

        if(mysql_num_rows($query) != 0){
            while($row = mysql_fetch_array($query)){
                $img = explode('.',$row['img']);
                
                echo '<table id="experimento" width="100%" border="0" class="tab-lista" cellpadding="0" cellspacing="0">
                    <tr>
                        <th colspan="2" scope="col" id="tblanco">'.$row['nombre'].'</th>
                    </tr>
                    <tr>
                        <td class="zoom-small-image">
                            <a href="../'.$img[0].'.jpg" class = "cloud-zoom" id="zoom1"
            rel="position:\'imgZ\',adjustX: 10, adjustY:-4, softFocus:true">
                            <img  src="../'.$row['img'].'"/>
                            </a>
                        </td>
                        <td>'.$row['descripcion'].'</td>
                    </tr>
                    <tr>
                        <td>Precio: $'.$row['precio'].'</td>
                        <td>Existencia: '.$row['cantidad'].'</td>
                    </tr>
                </table>';
            }
        }
    }

?> 
</body>
</html>